From c3c07a2d496f43cdda0a8f5617c6373d961f67df Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 9 Aug 2016 11:46:30 -0700 Subject: [PATCH] deltas: Use F_DUPFD_CLOEXEC properly You need to supply an argument to F_DUPFD_CLOEXEC or fcntl will return EINVAL. Use 3 as the minimum fd number as is standard. Closes: #454 Closes: #448 Approved by: cgwalters --- src/libostree/ostree-repo-static-delta-compilation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index 7ef7680d..188f467d 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -1362,7 +1362,7 @@ ostree_repo_static_delta_generate (OstreeRepo *self, } else { - tmp_dfd = fcntl (self->tmp_dir_fd, F_DUPFD_CLOEXEC); + tmp_dfd = fcntl (self->tmp_dir_fd, F_DUPFD_CLOEXEC, 3); if (tmp_dfd < 0) { glnx_set_error_from_errno (error); -- 2.30.2